home *** CD-ROM | disk | FTP | other *** search
- ;-------------------------comon routine begins--------------------------+
- ; from BLUEBOOK OF ASSEMBLY ROUTINES FOR IBM PC & XT.
- ; page : 38
- ;
- ; NAME COMON
- ; ROUTINE FOR COMMUNICATIONS LINE ON
- ;
- ; FUNCTION: This routine turns on the handshaking signal DTR (line 20)
- ; and RTS (line 4) on the specified communications line.
- ; INPUT: Upon entry DX contains the unit number (0 for comm1: and 1 for
- ; comm2:).
- ; OUTPUT: Just to the communications line.
- ; REGISTERS USED: No registers modified. DX is used for input.
- ; SEGMENTS REFERENCED: During the routine the system data segment is
- ; referenced.
- ; ROUTINES CALLED: None
- ; SPECIAL NOTES: None
- ;
- ; ROUTINE TO TURN ON INPUT FROM A COMMUNICATIONS LINE
- ;
- comon proc far
- ;
- push ds ; save registers
- push dx
- push si
- ;
- mov si,dx ; look up address of comm line
- add si,si ; double to index into table
- mov dx,40h ; segment of system I/O table
- mov ds,dx ; set data segment to this table
- mov dx,[si] ; look up data
- add dx,4 ; modem control register
- mov al,3 ; set DTR and RTS
- out dx,al ; send out control byte
- ;
- pop si ; restore registers
- pop dx
- pop ds
- ret ; return
- ;
- comon endp
- ;-------------------------comon routine ends---------------------------+